package com.digital.welcome.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.digital.welcome.entity.User;
import com.digital.welcome.entity.UserPhoto;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 韩
 */
@Mapper
@Repository
public interface UserPhotoMapper extends BaseMapper<UserPhoto> {
    @Select("select * from user_photo where user_name = #{userName}")
    UserPhoto getUserPhoto(User user);

    @Select("select * from user_photo")
    List<UserPhoto> selectAll();
}
